package com.wzh.activity.conf;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.wzh.activity.vo.OrderVo;
import com.wzh.common.utils.R;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author WZH
 * @title: ExceptionConf
 * @projectName miaosha
 * @description:
 * @date 2022/3/3
 */
public final class ExceptionConf {

    /**
     * @Author WZH
     * @方法描述: 限流处理方法
     * @Param:
     * @Return:
     * @Create: 2022/3/3
     */
    public static R exceptionHandler(@PathVariable("path")String path, @RequestBody OrderVo orderVo, HttpServletRequest request, BlockException be){
        be.printStackTrace();
        return R.error("进行限流操作");
    }
}
